<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

use App\Models\Traits\Admin\ActionButtonTrait;
use EloquentFilter\Filterable;

class Jd extends Model
{
	use Filterable, ActionButtonTrait;
    protected $table = 'admin_users_jd';

	protected $appends = ['actionButton'];
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    
    protected $actions = ['edit','delete'];

    protected $actionUri = 'jds';

    protected $fillable = [
    	'uid',
    	'seller_name',
    	'seller_short',
    	'person_name',
    	'person_phone',
    	'person_identity',
    	'bank_number',
    	'bank',
    	'branch',
    	'bank_phone',
    	'store_site',
    	'identity_img_front',
    	'identity_img_reverse',
    	'identity_img_person',
    	'bank_img',
    	'machine_img',
    	'state',
    	'opinion'
    ];

   	public function merchant()
   	{
   		return $this->belongsTo(Merchant::class, 'uid','id');
   	}
}
